package main

import (
	"fmt"
)

func getUserInput() (string, string) {
	var username, password string

	fmt.Println("请输入用户名和密码")
	fmt.Print("用户名: ")
	fmt.Scanln(&username)
	fmt.Print("密码: ")
	fmt.Scanln(&password)

	return username, password
}

func main() {
	username, password := getUserInput()

	if username != "root" {
		fmt.Println("用户名输入有误")
	} else if password != "123456" {
		fmt.Println("用户密码错误")
	} else {
		fmt.Println("登录成功")
	}
}